# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-capstone
_pkgname=capstone
pkgver=4.0.1
pkgrel=4
pkgdesc='A disassembly framework with the target of becoming the ultimate disasm engine for binary analysis and reversing in the security community.'
groups=('blackarch' 'blackarch-disassembler' 'blackarch-reversing')
url='https://github.com/aquynh/capstone'
arch=('x86_64' 'aarch64')
license=('BSD')
depends=('python2' 'capstone')
makedepends=('python2-setuptools' 'glibc')
options=('staticlibs')
source=("https://github.com/aquynh/$_pkgname/archive/$pkgver.tar.gz")
sha512sums=('43c52024065b41b45eff9423341db3f3d5163fa7aa01b360faa30437786740c8f2c34c36faa04dced5308e09d8bd78df3bad0ab9c06f98612169edb176f83c36')

build() {
  cd "$_pkgname-$pkgver"

  make
}

package() {
  cd "$_pkgname-$pkgver/bindings/python"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1
}

